Telegram Group & Telegram Channel
Класс объекта доступен через атрибут __class__:


>>> [1, 2].__class__
<class 'list'>


Однако более привычный способ получить класс — использовать функцию type. Это также единственный способ, который работает для классов старого стиля.


>>> type([1, 2])
<class 'list'>


Кроме того, если вы хотите проверить, является ли некоторый объект экземпляром данного класса, следует использовать isinstance вместо прямого сравнения:


>>> class A:
... pass
...
>>> class B(A):
... pass
...
>>> type(B())
<class '__main__.B'>
>>> isinstance(B(), A)
True


👉@BookPython



tg-me.com/BookPython/3690
Create:
Last Update:

Класс объекта доступен через атрибут __class__:


>>> [1, 2].__class__
<class 'list'>


Однако более привычный способ получить класс — использовать функцию type. Это также единственный способ, который работает для классов старого стиля.


>>> type([1, 2])
<class 'list'>


Кроме того, если вы хотите проверить, является ли некоторый объект экземпляром данного класса, следует использовать isinstance вместо прямого сравнения:


>>> class A:
... pass
...
>>> class B(A):
... pass
...
>>> type(B())
<class '__main__.B'>
>>> isinstance(B(), A)
True


👉@BookPython

BY Библиотека Python разработчика | Книги по питону


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/BookPython/3690

View MORE
Open in Telegram


Библиотека Python разработчика Telegram | DID YOU KNOW?

Date: |

However, analysts are positive on the stock now. “We have seen a huge downside movement in the stock due to the central electricity regulatory commission’s (CERC) order that seems to be negative from 2014-15 onwards but we cannot take a linear negative view on the stock and further downside movement on the stock is unlikely. Currently stock is underpriced. Investors can bet on it for a longer horizon," said Vivek Gupta, director research at CapitalVia Global Research.

At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?

Библиотека Python разработчика from cn


Telegram Библиотека Python разработчика | Книги по питону
FROM USA